﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
        <br />
        <asp:GridView ID="gvOrderItems" runat="server" AutoGenerateColumns="false" ShowFooter="true"
            DataKeyNames="orderItemkey" OnRowDeleting="gvOrderItems_RowDeleting" OnRowDataBound="gvOrderItems_OnRowDataBound">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:ImageButton ID="imgbtnDelete" runat="server" CommandName="Delete" CommandArgument='<%# Eval("OrderItemId").ToString() %>'
                            ImageUrl="~/Images/delete.gif" />
                    </ItemTemplate>
                </asp:TemplateField>
                <%--     <asp:TemplateField HeaderText="OrderItemId">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkOrderItemId" runat="server" Text='<%# Eval("OrderItemId").ToString() %>'
                            CommandArgument='<%# Eval("OrderItemId").ToString() %>'></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>--%>
                <asp:BoundField HeaderText="Perticulars" DataField="ItemDesc" />
                <asp:BoundField HeaderText="Size/Unit" DataField="Size" FooterText="Totals:" FooterStyle-HorizontalAlign="Right" />
                <asp:TemplateField HeaderText="Making Charge"  ItemStyle-HorizontalAlign="Right"  FooterStyle-HorizontalAlign="Right" >
                    <ItemTemplate>
                        <%# CurrencyGenrator.CurrencyFormat(DataBinder.Eval(Container.DataItem, "MakingCharge").ToString())%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Stones Cost"  ItemStyle-HorizontalAlign="Right"  FooterStyle-HorizontalAlign="Right" >
                    <ItemTemplate>
                        <%# CurrencyGenrator.CurrencyFormat(DataBinder.Eval(Container.DataItem, "StonesCost").ToString())%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="Gross Weight" DataField="Weight" DataFormatString="గ్రా: {0:F3}"
                    ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" />
                <asp:BoundField HeaderText="Wastage" DataField="Wastage" DataFormatString="గ్రా: {0:F3}"
                    ItemStyle-HorizontalAlign="Right" />
                <asp:BoundField HeaderText="Net Weight" DataField="TotalWeight" DataFormatString="గ్రా: {0:F3}"
                    ItemStyle-HorizontalAlign="Right"  FooterStyle-HorizontalAlign="Right"  />
                     <asp:TemplateField HeaderText="Gold Cost"  ItemStyle-HorizontalAlign="Right"  FooterStyle-HorizontalAlign="Right" >
                    <ItemTemplate>
                        <%# CurrencyGenrator.CurrencyFormat(DataBinder.Eval(Container.DataItem, "GoldCost").ToString())%>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="Other Charges"  ItemStyle-HorizontalAlign="Right"  FooterStyle-HorizontalAlign="Right" >
                    <ItemTemplate>
                        <%# CurrencyGenrator.CurrencyFormat(DataBinder.Eval(Container.DataItem, "OtherCharges").ToString())%>
                    </ItemTemplate>
                </asp:TemplateField>

                 <asp:TemplateField HeaderText="Net Cost"  ItemStyle-HorizontalAlign="Right"  FooterStyle-HorizontalAlign="Right" >
                    <ItemTemplate>
                        <%# CurrencyGenrator.CurrencyFormat(DataBinder.Eval(Container.DataItem, "NetCost").ToString())%>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle Font-Bold="true" />
        </asp:GridView>
    </div>
    </form>
</body>
</html>
